const jwt = require('jsonwebtoken')

module.exports = {
    set_token: function(tokenDate, myserect) {
        let token = jwt.sign(tokenDate, myserect, {expiresIn: 36000000})
        return token;
    },

    get_token: function(token, myserect) {
        let decode = jwt.verify(token, myserect);
        return decode;
    }
}